
<template>
  <div>{{ count }}</div>
  <div>{{ double }}</div>
  <button @click="increase">+1</button>
</template>

<script lang="ts">
import { ref, computed, defineComponent } from "vue";
defineComponent({
  name: "setup",
  setup() {
    const count = ref(0);

    const double = computed(() => {
      return count.value * 2;
    });

    const increase = () => {
      count.value++;
    };

    return {
      count,
      double,
      increase,
    };
  },
});
</script>

<style>
</style>
